package hash;
import com.sun.org.apache.xml.internal.utils.res.IntArrayWrapper;

import java.util.Map;
import java.util.TreeMap;
import java.util.Set;

public class Test {
    static int x;
    public static void main(String[] args) {
        System.out.println(x);
    }
    public static void main2(String[] args) {
        Map<String,Integer> map = new TreeMap<>();
        map.put("hello",3);
        map.put("abcd",2);
        map.put("bit",10);
        System.out.println(map);

        Integer ret = map.get("hello");
        System.out.println(ret);

        Set<String> set = map.keySet();
        System.out.println(set);

        Set<Map.Entry<String,Integer>> entrySet = map.entrySet();

        for (Map.Entry<String,Integer> entry:entrySet){
            System.out.println(entry.getKey()+" "+entry.getValue());
        }

    }
    public static void main1(String[] args) {
        BinarySearchTree tree = new BinarySearchTree();
        int[] array = {4,7,32,55,12,6,9,1,17};
        for (int i = 0; i < array.length; i++) {
            tree.insert(array[i]);
        }
        tree.inorder(tree.root);
        tree.remove(17);
        System.out.println();
        tree.inorder(tree.root);
    }
}
